package com.lvmama.client.rhino;

import com.github.pagehelper.PageInfo;
import com.lvmama.common.result.Result;
import com.lvmama.pojo.dto.rhino.flow.FlowConversionDTO;
import com.lvmama.pojo.dto.rhino.flow.FlowStatisticsFunnel;
import com.lvmama.pojo.dto.rhino.page.FlowStatisticsVo;
import com.lvmama.pojo.entity.rhino.page.FlowData;
import com.lvmama.pojo.entity.rhino.topic.StatisticCode;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface FlowConversionClient {

    @RequestMapping(method = RequestMethod.GET,value = "/flowConversion/getLikeCodeObj",consumes = "application/json")
    List<StatisticCode> getLikeCodeObj(@RequestParam("levelCode") String levelCode);

    @RequestMapping(method = RequestMethod.GET,value = "/flowConversion/getDeviceCodeByLikeNamePcAndWap",consumes = "application/json")
    List<String> getDeviceCodeByLikeNamePcAndWap(@RequestParam("codeName") String codeName);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getFlowbyApp",consumes = "application/json")
    Result<List<FlowStatisticsVo>> getFlowbyApp(@RequestBody FlowConversionDTO flowConversionDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getFlowbyChannelWap",consumes = "application/json")
    Result<List<FlowStatisticsVo>> getFlowbyChannelWap(@RequestBody FlowConversionDTO flowConversionDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getFlowbyChannel",consumes = "application/json")
    Result<List<FlowStatisticsVo>> getFlowbyChannel(@RequestBody FlowConversionDTO flowConversionDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getAllFunnel",consumes = "application/json")
    Result<PageInfo<FlowStatisticsFunnel>> getAllFunnel(@RequestBody FlowStatisticsFunnel flowStatisticsFunnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getFunnelDetail",consumes = "application/json")
    Result<List<FlowStatisticsFunnel>> getFunnelDetail(@RequestBody FlowStatisticsFunnel flowStatisticsFunnel);

    @RequestMapping(method = RequestMethod.GET,value = "/flowConversion/getLikeCodes",consumes = "application/json")
    List<String> getLikeCodes(@RequestParam("codeName") String codeName);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getFlowStatisticsData",consumes = "application/json")
    Result<FlowData> getFlowStatisticsData(@RequestBody FlowConversionDTO flowConversionDTO);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/updateFunnel",consumes = "application/json")
    void updateFunnel(@RequestBody FlowStatisticsFunnel funnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getFunnel",consumes = "application/json")
    Result<FlowStatisticsFunnel> getFunnel(@RequestBody FlowStatisticsFunnel funnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/deleteFunnelDetail",consumes = "application/json")
    void deleteFunnelDetail(@RequestBody FlowStatisticsFunnel funnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/insertFunnel",consumes = "application/json")
    void insertFunnel(@RequestBody FlowStatisticsFunnel funnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/insertFunnelDetail",consumes = "application/json")
    void insertFunnelDetail(@RequestBody FlowStatisticsFunnel funnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/deleteFunnel",consumes = "application/json")
    void deleteFunnel(@RequestBody FlowStatisticsFunnel funnel);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/selectStatisticCode",consumes = "application/json")
    StatisticCode selectStatisticCode(@RequestBody StatisticCode statisticCode);

    @RequestMapping(method = RequestMethod.POST,value = "/flowConversion/getLikeCodeObjNotParent",consumes = "application/json")
    List<StatisticCode> getLikeCodeObjNotParent(@RequestParam("codeName") String codeName);
}
